Ticket 3875 - Negative Match for Constraint
Summary: Negative Match for Constraint
Status: OPEN
Alias: None
Product: Slurm
Classification: Unclassified
Component: Scheduling (show other tickets)
Version: 17.11.x
Hardware: Linux Linux
: --- 5 - Enhancement
Assignee: Unassigned Developer
QA Contact:
URL:
: 13870 (view as ticket list)
Depends on:
Blocks:
 
Reported: 2017-06-07 10:33 MDT by Paul Edmon
Modified: 2024-04-22 14:08 MDT (History)
8 users (show)

See Also:
Site: Harvard University
Alineos Sites: ---
Atos/Eviden Sites: ---
Confidential Site: ---
Coreweave sites: ---
Cray Sites: ---
DS9 clusters: ---
HPCnow Sites: ---
HPE Sites: ---
IBM Sites: ---
NOAA SIte: ---
OCF Sites: ---
Recursion Pharma Sites: ---
SFW Sites: ---
SNIC sites: ---
Linux Distro: ---
Machine Name:
CLE Version:
Version Fixed:
Target Release: ---
DevPrio: ---
Emory-Cloud Sites: ---


Attachments

Note You need to log in before you can comment on or make changes to this ticket.
Description Paul Edmon 2017-06-07 10:33:57 MDT
So you can do positive matches via sbatch constraint, but what would be nice is to be able to do a negative match.  So exclude certain features from run.  So lets say for instance that you have a backfill queue but you don't want to run on old hardware, so you say --constraint="!westmere".  However, you don't really care what other version of hardware you run on.  A negative match would be really handy for these situations.
Comment 1 Tim Wickberg 2017-06-07 10:37:29 MDT
Hey Paul -

I'm shifting this back to Sev4 for a bit; Bugzilla is rigged to automatically force Sev5 requests there so we get a chance to perform some initial triage before adding it the the (rather large) list of potential enhancements.

That also helps make sure we're aware of it, and (in a lot of other cases) that there isn't something already in place to address that. Especially as our workflow for Sev5 is a bit different than Sev1-4.

- Tim
Comment 2 Paul Edmon 2017-06-07 10:51:33 MDT
Ah okay.  I saw it get filed as a Sev4 and I was confused as this is 
definitely not urgent, just a case we just ran into that would be a nice 
to have.

-Paul Edmon-


On 6/7/2017 12:37 PM, bugs@schedmd.com wrote:
> Tim Wickberg <mailto:tim@schedmd.com> changed bug 3875 
> <https://bugs.schedmd.com/show_bug.cgi?id=3875>
> What 	Removed 	Added
> Assignee 	support@schedmd.com 	tim@schedmd.com
> Severity 	5 - Enhancement 	4 - Minor Issue
>
> *Comment # 1 <https://bugs.schedmd.com/show_bug.cgi?id=3875#c1> on bug 
> 3875 <https://bugs.schedmd.com/show_bug.cgi?id=3875> from Tim Wickberg 
> <mailto:tim@schedmd.com> *
> Hey Paul -
>
> I'm shifting this back to Sev4 for a bit; Bugzilla is rigged to automatically
> force Sev5 requests there so we get a chance to perform some initial triage
> before adding it the the (rather large) list of potential enhancements.
>
> That also helps make sure we're aware of it, and (in a lot of other cases) that
> there isn't something already in place to address that. Especially as our
> workflow for Sev5 is a bit different than Sev1-4.
>
> - Tim
> ------------------------------------------------------------------------
> You are receiving this mail because:
>
>   * You reported the bug.
>
Comment 5 Martin Cuma 2017-08-03 14:24:40 MDT
I would like to see this feature as well. Posting in hope to increase the priority of its implementation ;-)
Comment 6 Moe Jette 2017-08-03 14:47:29 MDT
It's not a great solution, but this could probably be handled by a job_submit plugin today, although any change to the configured features would necessitate changing the plugin.
https://slurm.schedmd.com/job_submit_plugins.html

The earliest this _might_ land in slurm would be the version 17.11 release, but I don't know if that will be possible.
Comment 7 Kilian Cavalotti 2019-02-27 09:19:31 MST
I was just about to file a new enhancement request for this too. 

We have the same use case as Paul, where users have codes targeting specific CPU architectures, and want to avoid nodes that don't support specific CPU instructions.

Right now, for instance, to request a node with AVX2 on Sherlock, the constraint looks like: -C "[CPU_GEN:HSW|CPU_GEN:BDW|CPU_GEN:SKX]"

It would certainly be easier for users if they could just do -C "!CPU_GEN_IVB"

In other words, we would very much like this too. :)

Cheers,
-- 
Kilian
Comment 8 Kilian Cavalotti 2019-08-06 16:05:23 MDT
Hi!

I know this is old, but this is still an actively requested feature from our users.

Is there any chance to see this coming in a not-too-distant future? Moe mentioned 17.11, but... :)

Thanks!
-- 
Kilian
Comment 9 Sergey Meirovich 2020-04-13 10:51:55 MDT
We will also love to see this feature implemented.
Comment 10 Durai Arasan 2020-06-22 07:54:13 MDT
Yes this feature is required and we would like to see it implemented! 

Thanks,
Durai
Comment 11 Tim Wickberg 2020-06-23 22:39:27 MDT
I agree this would be a convenient extension of the existing syntax, but unfortunately our development slate for 20.11 is full at this time.

If a site is interesting in sponsoring this for the 21.08 release please contact me, otherwise we may or may not get to handle this in that timeframe.

Alternatively, if someone wishes to propose a patch to add this syntax we're always happy to review external contributions.

One implementation note should someone want to propose a patch for this - due to how bash interprets ! (when left unescaped, or inside double-quotes), the syntax I'd expect to adopt is "~" for the NOT operator.

- Tim
Comment 12 Jason Booth 2022-04-19 13:51:39 MDT
*** Ticket 13870 has been marked as a duplicate of this ticket. ***
Comment 13 Bruno Travouillon 2023-08-15 13:49:03 MDT
Hi,

We may have an interest in such feature as well. Our use case would be to exclude nodes with NVIDIA MIG GPUs due to some limitations [1]. In our setup, the nodes with MIG GPUs have the `Feature=mig`, so `--contraint=~mig` would be perfect.

[1] https://docs.nvidia.com/datacenter/tesla/mig-user-guide/index.html#app-considerations
Comment 14 David Chin 2024-04-22 14:08:06 MDT
Expressing support for such a feature. Since the minimal set of Booleans is {AND, OR, NOT}, adding the missing NOT would be an extremely useful change.